<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="shortcut icon" type="image/png" href="https://xiangyuecn.gitee.io/areacity-jsspider-statsgov/assets/icon.png">

<meta http-equiv="X-UA-Compatible" content="edge" />
<title>AreaCity Geo格式转换工具</title>

<script>
var AppCmds=window.external||{};
var AppCalls={
	scope:{}
	,translateGeoEnable:function(){
		var fn=Runtime.AppCalls.translateGeoEnable;
		if(fn){
			var val=fn();
			AppCalls.scope.tgEnable=val;
			return val;
		};
		return "";
	}
	,translateGeos:function(geosStr){
		var fn=Runtime.AppCalls.translateGeos;
		if(fn){
			var val=fn(geosStr);
			
			if(val!=null){
				var tgCount=++AppCalls.scope.tgCount;
				var tgpCount=AppCalls.scope.tgpCount=AppCalls.scope.tgpCount+geosStr.split(",").length+1;
				Runtime.UpdateStatus(AppCalls.scope.execName+"已调用"+tgCount+"次坐标转换，共"+tgpCount+"个坐标点");
			};
			return val;
		};
		return null;
	}
	,customSQLConfig:function(){
		var rtv={error:"",config:{}};
		var fn=Runtime.AppCalls.customSQLConfig;
		if(fn){
			fn(rtv);
		}else{
			rtv.error="请先选择内置脚本《[插件] 通用自定义SQL配置》并配置完成后再进行自定义SQL操作";
		}
		return JSON.stringify(rtv);
	}
	,onTransformStart:function(execName){
		AppCalls.scope={execName:execName,tgEnable:"",tgCount:0,tgpCount:0};
		Runtime.UpdateStatus("");
		Runtime.Log("[系统] 执行任务中:"+execName,"#bbb");
		
		var fn=Runtime.AppCalls.onTransformStart;
		if(fn){
			fn(execName);
		}else{
			Runtime.Mask("执行任务中:"+execName);
		};
	}
	,onTransformSuccess:function(execMsg){
		var fn=Runtime.AppCalls.onTransformSuccess;
		if(fn){
			fn(execMsg);
		};
	}
	,onTransformEnd:function(){
		Runtime.Log("[系统] 执行任务结束","#bbb");
		var fn=Runtime.AppCalls.onTransformEnd;
		if(fn){
			fn();
		}else{
			Runtime.Mask(false);
		};
	}
};

var appFixLineClick=function(){
	alert("请先执行内置脚本 “"+$("option[value=fixline]").text()+"” 后，在来FixLine操作");
};

var LM="2023-04-02 13:36";
</script>

<style>
body{
	word-wrap: break-word;
	background:#f0f0f0 center top no-repeat;
	background-size: auto 680px;
}
pre{
	white-space:pre-wrap;
}
a{
	text-decoration: none;
	cursor: pointer;
	color:#06c;
}
a:hover{
	color:#f00;
}
p{
	text-indent: 32px;
}
img{
	max-width:90%;
}

.Center{
	text-align: center;
}

.main{
	max-width:900px;
	margin:0 auto;
	padding-bottom:80px
}

.mainBox{
	margin-top:12px;
	padding: 12px;
	border-radius: 6px;
	background: #fff;
	--border: 1px solid #f60;
	box-shadow: 2px 2px 3px #aaa;
}


.mainBtn{
	display: inline-block;
	cursor: pointer;
	border: none;
	border-radius: 3px;
	background: #0b1;
	color:#fff;
	padding: 0 15px;
	margin:3px 20px 3px 0;
	line-height: 36px;
	height: 36px;
	overflow: hidden;
	vertical-align: middle;
}
.mainBtn:active{
	background: #0a1;
}


.pd{
	padding:0 0 6px 0;
}
.del{
	text-decoration: line-through;
}
.b{
	font-weight: bold;
	font-style: normal;
}
.i{
	padding: 2px 4px;
	background-color: #f6f6f6;
	vertical-align: middle;
	color: #c7254e;
	font-size: 12px;
	white-space: pre-wrap;
	border-radius: 3px;
	font-style: normal;
}
.lb{
	display:inline-block;
	vertical-align: middle;
	background:#00940e;
	color:#fff;
	font-size:14px;
	padding:2px 8px;
	border-radius: 99px;
}

select,select option{
	height:80px
}
</style>

<style>
.Left{
	text-align:left;
}
.Right{
	text-align:right;
}
.Center{
	text-align:center;
}
.CenterV{
	display:-ms-box;
	display:box;
	display:-ms-flex;
	display:flex;
	-ms-box-align:center;
	box-align:center;
	-ms-align-items:center;
	align-items:center;
}
.ILB{
	display:inline-block;
}


.FlexBox{/*水平排列*/
	display:-ms-box;
	display:box;
	display:-ms-flex;
	display:flex;
}
.FlexBoxV{/*垂直排列*/
	-ms-box-orient:vertical;
	box-orient:vertical;
	-ms-flex-direction:column;
	flex-direction:column;
}
.FlexCenter{/*和FlexBox一起使用，内部元素的内容水平方向居中，可和FlexCenterV组合使用*/
	-ms-box-pack:center;
	box-pack:center;
	-ms-justify-content:center;
	justify-content:center;
}
.FlexCenterV{/*和FlexBox一起使用，内部元素的内容垂直方向居中，可用CenterV来简化*/
	-ms-box-align:center;
	box-align:center;
	-ms-align-items:center;
	align-items:center;
}
.FlexItem{
	position:relative;
	
	-ms-box-flex:1;
	box-flex:1;
	-ms-flex:1;
	flex:1;
}


.Fill{/*宽高填充整个区域*/
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
	overflow:hidden;
}
</style>
</head>
<body>

<div class="pageLoad Center" style="padding:180px 0">页面加载中，请稍后...</div>
<div class="main" style="display:none">
	<div class="mainBox" style="margin-top:0px">
		<div style="border:1px solid #ddd">
			<textarea class="codeEdit" style="width:98%;height:300px"></textarea>
		</div>
		
		<div style="padding-top:12px">
			<div class="FlexBox CenterV">
				<div class="FlexItem">
					<button class="mainBtn yingyongBtn" onclick="Runtime.CodeRunClick()" style="padding:0 40px">应用</button>
				</div>
				<div style="font-size:14px">
					内置脚本：<span class="loadCodeSelect"></span>
				</div>
			</div>
			
			<div style="font-size:14px;margin-top:10px">
				<span style="color:#666">状态:</span>
				<span class="statusView"></span>
			</div>
			
			<div class="ctrlBtns" style="display:none;margin-top:10px"></div>
		</div>
	</div>
	
	<div class="mainBox">
		<div class="FlexBox" style="padding-bottom:10px">
			<div class="FlexItem">
				<button onclick='Runtime.LogClear()'>清除日志</button>
				<button onclick='showCmds()'>显示可用命令</button>
			</div>
			<div>
				<a href="https://xiangyuecn.gitee.io/areacity-jsspider-statsgov/assets/AreaCity-Geo-Transform-Tools.html" target="_blank">详细教程、软件许可及服务协议、购买付费版>></a>
			</div>
		</div>
		
		<div class="mainLog"></div>
	</div>
</div>

<script type="text/template" class="tp_loadCodeSelect">
<select style="height:30px" onchange="if(this.value)Runtime.LoadCode(this.value);this.blur()">
	<option value="">==== GCJ-02（高德）转其他坐标系 ====</option>
	<option value="to_bd09">[插件] 转成 BD-09 百度地图 [误差约1米内]</option>
	<option value="to_wgs84">[插件] 转成 WGS-84 GPS 谷歌地图 [误差约10米内]</option>
	<option value="to_wgs84">[插件] 转成 CGCS2000 天地图 [误差约10米内] ≈GPS</option>
	
	<option value=""></option>
	<option value="">==== 工具集 ====</option>
	<option value="custom_sql_config">[插件] 通用自定义SQL配置（任意数据库适配）</option>
	<option value="vector_file_format_convert">[转换] 文件格式批量互转 SHP|JSON|KML|GML|……</option>
	<option value="geojson_level_split">[拆分] GeoJSON 按省市区将下级拆分到多个文件</option>
	<option value="geojson_merge">[合并] GeoJSON 多个文件合并成一个文件</option>
	
	<option value=""></option>
	<option value="">==== 行政区划转SQL、导入数据库 ====</option>
	<option value="exec/city_to_sql">[转换] ok_data_level*.csv 省市区镇转SQL</option>
	<option value="exec/city_to_db">[导入] ok_data_level*.csv 省市区镇导入数据库</option>
	
	<option value=""></option>
	<option value="">==== 其他代码 ====</option>
	<option value="gps_to_gcj02">[Test] WGS-84 GPS/CGCS2000 转成 GCJ-02</option>
	<option value="gps_to_bd09">[Test] WGS-84 GPS/CGCS2000 转成 BD-09</option>
	<option value="fixline">[Test] FixLine 修复CSV文件内错误边界数据</option>
	<option value="exec/appcmds_test">[Test] 浏览器接口测试用例</option>
</select>
</script>


<script src="https://xiangyuecn.gitee.io/recorder/assets/ztest-jquery.min-1.9.1.js"></script>
<script src="https://xiangyuecn.gitee.io/recorder/assets/ztest-codemirror.min.5.48.4.js"></script>

<script>
(function(){
window.NOOP=function(){};
window.RootFolder="..";
window.Runtime={
	AppCalls:{}
	,ExecData:{}
	
	/*注册显示的控制按钮*/
	,Ctrls:function(ctrls){
		this._ctrls=ctrls;
		//ctrls.push({html:'<span style="color:#aaa;font-size:12px">提示：操作日志可能要拖到底下才能看到</span>'});
		
		var html=[];
		for(var i=0;i<ctrls.length;i++){
			var o=ctrls[i];
			if(o.html){
				html.push(o.html);
			}else{
				html.push('<button class="mainBtn '+o.cls+'" onclick="'+o.click+'()">'+o.name+'</button>');
			};
		};
		html=html.join("\n");
		$(".ctrlBtns").html(html)[html?"show":"hide"]();
	}
	
	,Import:function(jsList,win){
		win=win||window;
		var doc=win.document;
		var load=function(idx){
			if(idx>=jsList.length){
				Runtime.CodeRunClick(1);
				return;
			};
			var itm=jsList[idx];
			var url=itm.url;
			if(itm.check()===false){
				load(idx+1);
				return;
			};
			
			var elem=doc.createElement("script");
			elem.setAttribute("type","text/javascript");
			elem.setAttribute("src",url+"?t="+Date.now());
			if(!("onload" in elem)){//ie 8
				elem.onreadystatechange=function(){
					if(elem.readyState=="loaded"){
						load(idx+1);
					}
				}
			}
			elem.onload=function(){
				load(idx+1);
			};
			elem.onerror=function(e){
				Runtime.Log("请求失败:"+(e.message||"-")+"，"+url,1);
			};
			doc.body.appendChild(elem);
		};
		setTimeout(function(){
			load(0);
		});
		
		Runtime.CodeRunImport();
	}
	
	/*显示日志内容，color:0默认，1红色，2绿色，其他指定颜色*/
	,Log:function(msg,color){
		var now=new Date();
		var t=("0"+now.getHours()).substr(-2)
			+":"+("0"+now.getMinutes()).substr(-2)
			+":"+("0"+now.getSeconds()).substr(-2);
		$(".mainLog").prepend('<div style="color:'+(!color?"":color==1?"red":color==2?"#0b1":color)+'">['+t+']'+msg+'</div>');
	}
	,LogClear:function(){
		$(".mainLog").html("");
	}
	,ToPre:function(obj, attr){
		var val=JSON.stringify(obj,null,'    ')||"";
		val=val.replace(/&/g,"&amp;").replace(/</g,"&lt;");
		return '<pre '+attr+'>'+val+'</pre>';
	}
	
	
	,Load:function(url_,True,False){
		True=True||NOOP;
		False=False||NOOP;
		var set={url:url_};
		if(typeof(url_)!="string"){
			set=url_;
		};
		if(!set.method || set.method.toUpperCase()=="GET"){
			set.url=set.url+(set.url.indexOf("?")+1?"&":"?")+"t="+Date.now();
		};
		
		var id=++Runtime.Load_Data.id;
		set.callback="Runtime.Load_Data.cb"+id;
		Runtime.Load_Data["cb"+id]=function(data){
			var obj=data.v||{};
			var status=+obj.status||0;
			if(data.c!==0){
				False("请求失败："+data.m, obj);
			}else if(status<200||status>=300){
				False("请求状态无效["+status+"]", obj);
			}else{
				True(obj.value,obj);
			};
		};
		
		AppCmds.load(JSON.stringify(set));
	}
	,Load_Data:{id:0}
	
	
};


window.onerror=function(message, url, lineNo, columnNo, error){
	//https://www.cnblogs.com/xianyulaodi/p/6201829.html
	Runtime.Log('<span style="color:red">【Uncaught Error】'+message+'<pre>'+"at:"+lineNo+":"+columnNo+" url:"+url+"\n"+(error&&error.stack||"不能获得错误堆栈")+'</pre></span>',1);
	AppCmds.showTips('【脚本错误】'+message+'\r\nat:'+lineNo+":"+columnNo+" url:"+url+"\r\n"+(error&&error.stack||"不能获得错误堆栈").replace(/\r?\n/g,"\r\n"),true);
};
})();
</script>

<script>
$(function(){

Runtime.VersionLess=function(ver,_cur){
	var arr=(ver||"").split(".");
	var cur=(_cur||InitReadConfig.AppVersion||"").split(".");
	for(var i=0;;i++){
		if(i>=arr.length){
			return false;
		};
		if(i>=cur.length){
			return true;
		};
		if(arr[i]!=cur[i]){
			if((+arr[i]||0)>(+cur[i]||0)){
				return true;
			};
			return false;
		};
	};
	return false;
};

var codeRunCtrl;
Runtime.CodeRunImport=function(){
	if(codeRunCtrl==1){
		codeRunCtrl=2;
		throw new Error("kill");
	};
};
Runtime.CodeRunClick=function(isImport){
	if(!isImport){
		codeRunCtrl=1;
	};
	if(codeRunCtrl==1){
		Runtime.Log("代码开始运行，请勿操作...",1);
		$(".ctrlBtns").html("").hide();
	};
	if(codeRunCtrl==3){
		return;
	};
	if(codeRunCtrl==2){
		codeRunCtrl=3;
	};
	
	try{
		var code=$(".codeEdit").val();
		window.eval(code);
		Runtime.Log("代码已运行",2);
		
		codeChange(code,true);
	}catch(e){
		if(e.message.indexOf("kill")+1){
			return;
		};
		Runtime.Log("运行出错:"+e.message+"<pre>"+e.stack+"</pre>",1);
	};
};




Runtime.LoadCode=function(key){
	var path="WebviewSettingsCodes/"+key+".js";
	Runtime.Mask("正在加载"+path+"...");
	$.ajax({
		url:path+"?t="+Date.now()
		,dataType:"text"
		,success:function(data){
			Runtime.Mask(false);
			var idx=0;
			data=data.replace(/(AppCmds.exec\(\s*)"([^"]+?)"(\s*\))/g,function(z,a,b,c){
				var id="<此处已删除过长源码，复制无效-"+key+"-"+(++idx)+">";
				Runtime.ExecData[id]=b;
				return a+'Runtime.ExecData["'+id+'"]'+c;
			});
			Runtime.SetCode(data);
			
			var rn=(/《(.+?)》/.exec(data)||[])[1]||"";
			Runtime.Log("已加载《"+(rn||path)+"》脚本源码，点击应用后才会生效",2);
			
			document.documentElement.scrollTop=$(".yingyongBtn").offset().top-200;
		}
		,error:function(){
			Runtime.Mask(false);
			Runtime.Log("加载指定的"+path+'失败，请到<a href="https://github.com/xiangyuecn/AreaCity-JsSpider-StatsGov/tree/master/assets/AGT/WebviewSettingsCodes" target="_blank">WebviewSettingsCodes</a>目录内手动复制源码',1);
		}
	});
};



$(".pageLoad").hide();
$(".main").show();
$(".loadCodeSelect").html($(".tp_loadCodeSelect").html());

var elem=$(".codeEdit");
var w=elem.width();
var edit=CodeMirror.fromTextArea(elem[0],{
		mode:"javascript"
		,lineNumbers:true
		,lineWrapping:true
	});
Runtime.CodeEdit=edit;
edit.setSize(w+"px","auto");
edit.on("change",function(a){
	var val=a.getValue();
	elem.val(val);
	codeChange(val);
});

Runtime.SetCode=function(val){
	edit.setValue(val);
	
	edit.refresh();
	codeChange(val);
};
Runtime.GetCode=function(){
	return elem.val();
};

var codeChange=function(val,reset){
	if(reset || val!=prevCode){
		prevCode=val;
		codeIsChange=reset?false:true;
		Runtime.UpdateStatus(reset?"":null);
	};
};
var prevCode="/**请选择内置脚本，或者在此处输入JavaScript代码**/\n\n";
var codeIsChange=false;
Runtime.SetCode(prevCode);


Runtime.translateGeoDisable=function(){
	Runtime.AppCalls.translateGeoEnable=null;
	Runtime.AppCalls.translateGeos=null;
	Runtime.UpdateStatus();
};
Runtime.customSQLConfigDisable=function(){
	Runtime.AppCalls.customSQLConfig=null;
	Runtime.UpdateStatus();
};


var statusMsg="";
Runtime.UpdateStatus=function(msg){
	statusMsg=msg==null?statusMsg:(msg||"");
	var html=[];
	if(codeIsChange){
		html.push('<span style="color:red;font-weight:bold">代码已修改，点击“应用”后生效</span>');
	};
	
	var cscEnable=Runtime.AppCalls.customSQLConfig;
	if(cscEnable){
		html.push('<span style="color:#0b1">通用自定义SQL配置插件已启用<button onclick="Runtime.customSQLConfigDisable()">禁用</button></span>');
	};
	var tgEnable=Runtime.AppCalls.translateGeoEnable;
	if(tgEnable){
		var tgVal=tgEnable();
		if(tgVal){
			html.push('<span style="color:#0b1">坐标系转换插件已启用('+tgVal+')，在处理ok_geo.csv数据时会自动调用本坐标系转换<button onclick="Runtime.translateGeoDisable()">禁用</button></span>');
		};
	};
	
	if(statusMsg){
		html.push(statusMsg);
	};
	$(".statusView").html(html.join("；")||'<span style="color:#999">无额外信息</span>');
};
Runtime.UpdateStatus();

});
</script>



<script>
var InitReadConfig={};
(function(){
Runtime.Mask=function(msg){
	$(".maskView").remove();
	if(msg!==false){
		$("body").append('<div class="maskView Fill Center CenterV" style="position:fixed;background: rgba(0,0,0,0.3);z-index:9999;font-size:30px;color:#fff"><div class="FlexItem">'+msg+'</div></div>');
	};
};

try{
	InitReadConfig=JSON.parse(AppCmds.config());
}catch(e){
	InitReadConfig.NotApp=true;
	return;
};

})();
</script>





<script type="text/template" class="tp_pageCmds">
当前页面可调用Runtime方法列表：
	RootFolder:"" 当前页面根目录，结尾不含/，实际为/assets/目录

	Runtime.Import(jsList) 导入js列表，只能调用一次，jsList:[{url:"",check:fn()},...] check返回false跳过这条的导入

	Runtime.Ctrls(ctrls) 在控制区显示按钮，只能调用一次，ctrls:[{name:"按钮名称",click:"函数名称",cls:"class name"},{html:"html代码"},...]
	
	Runtime.Log(msgHtml,color) 在日志区显示日志html，color:0默认，1红色，2绿色，其他指定颜色
	Runtime.ToPre(obj, attr) 将对象用JSON格式化，然后返回pre标签html，用于Log打印对象，attr为pre标签的属性
	
	Runtime.LogClear() 清除显示的日志
	
	Runtime.Mask(msg) 弹出一个遮罩层，里面显示msg内容，msg=false时关闭遮罩
	
	Runtime.Load(url|set,True,False) 调用AppCmds.load加载资源，True(val,data)，False(msg, data)
	
	Runtime.GetCode() 获取输入框内的代码
	Runtime.SetCode(code) 输入框内显示代码
	
	Runtime.UpdateStatus(msg) 更新显示状态信息
	
	Runtime.VersionLess(ver) 当前版本是否低于此版本
	
	Runtime.AppCalls={***} 实现window.AppCalls相关方法给软件调用，如果不提供将使用默认方法
</script>
<script>
var showCmds=function(){
	Runtime.Log('<pre>'+$(".tp_pageCmds").html()+'</pre>'+AppCmds.help());
};
var showConfig=function(){
	var val=JSON.stringify(JSON.parse(AppCmds.config()),null,'    ');
	val=val.replace(/&/g,"&amp;").replace(/</g,"&lt;");
	$(".showConfigBox").html('<pre style="padding:5px;border:1px solid #eee">>> AppCmds.config() '+new Date().toLocaleString()+'\n'+val+'</pre>');
};
Runtime.Log('当前环境：'
	+"<pre>LM: "+LM+"\n\nURL: "+location.href+"\n\nUA: "+navigator.userAgent+"\n\nApp: "+InitReadConfig.AppName+"["+InitReadConfig.AppVersion+"]\n\nID: "+InitReadConfig.AppID+"</pre>"
	+'<div class="Right"><a onclick="showConfig()" style="font-size:12px" title="点击查看AppCmds.config()信息">点击展开更多信息</a></div>'
	+'<div class="showConfigBox"></div>');
Runtime.Log("小提示：择一个内置插件并应用后，此插件可以作用到其他脚本，因此可以先后执行不同的脚本组成不同的数据处理结果。");
Runtime.Log("脚本运行环境已准备好，每次修改脚本后需要点击应用才会生效哦。",2);
</script>





<script>
function RandomKey(len){
	var s=[];
	for(var i=0;i<len;i++){
		s.push(String.fromCharCode(Math.floor(Math.random()*26)+97));
	};
	return s.join("");
};
function ParseObject(str){
	var val,err;
	if(str && typeof(str)=="string"){
		try{
			val=JSON.parse(str);
		}catch(e){
			err=e;
		};
	};
	ParseObject.e=err;
	return val||{};
};
function ParseArray(str){
	var val,err;
	if(str && typeof(str)=="string"){
		try{
			val=JSON.parse(str);
		}catch(e){
			err=e;
		};
	};
	ParseArray.e=err;
	return val||[];
};

function FormatDate(date,type,sp){
	if(typeof(type)=="string"){
		type=FormatDate[type];
	}
	if(sp==null){
		sp="-";
	}
	date=date==null?new Date():ParseDateObject(date)||new Date(Date1800);
	var Y=date.getFullYear()
		,mM=date.getMonth()+1
		,M=("0"+mM).slice(-2)
		,mD=date.getDate()
		,D=("0"+mD).slice(-2)
		,th=date.getHours()
		,h=("0"+th).slice(-2)
		,tm=date.getMinutes()
		,m=("0"+tm).slice(-2)
		,ts=date.getSeconds()
		,s=("0"+ts).slice(-2)
		,tS=date.getMilliseconds()
		,S=("00"+tS).slice(-3)
		,o=FormatDate;
	switch(type){
	case o.YMD:return Y+sp+M+sp+D;
	case o.HM:return h+":"+m;
	case o.YMDHMS:return Y+sp+M+sp+D+" "+h+":"+m+":"+s;
	case o.YMDHM:return Y+sp+M+sp+D+" "+h+":"+m;
	case o.NUM:return date.getTime();
	default:return Y+sp+M+sp+D+" "+h+":"+m+":"+s+"."+S;
	}
}
FormatDate.YMD=1;
FormatDate.HM=5;
FormatDate.YMDHMS=6;
FormatDate.YMDHM=7;
FormatDate.NUM=9;
FormatDate.DEF=0;

var Date1800=new Date(1800,6-1,1).getTime();
function ParseDateObject(date){
	if(typeof(date)=="number"){
		return new Date(date);
	}
	if(!date){
		return null;
	}
	if(!date.getFullYear){
		if(/^(\d{4})[^\d]*(\d\d?)[^\d]*(\d\d?)[^\d]*(?:(\d\d?)[^\d]*(\d\d?)[^\d]*(?:(\d\d?)[^\d]*(\d{1,3})?)?)?$/.test(date+"")){//xx xx:12.456 火狐 IE更加不支持
			date=new Date(
				+RegExp.$1
				,+RegExp.$2-1
				,+RegExp.$3
				
				,+RegExp.$4||0
				,+RegExp.$5||0
				,+RegExp.$6||0
				,+RegExp.$7||0
			);
		}else{
			date=new Date(date+"");
		}
	}
	try{
		return date&&date.getFullYear()?date:null;
	}catch(e){
		return null;
	}
}
</script>

<script>
(function(){

if(!InitReadConfig.NotApp){
	AppCmds.ready();
}else{
	for(var i=0;i<10;i++){
		Runtime.Log("警告：非工具软件环境，不支持运行本网页!",1);
	}
};

window.IsIE=false;
window.IEVersion=99;
var ua=navigator.userAgent,m;
m=/MSIE.+?(\d+)|Trident.+?rv:(\d+)/i.exec(ua);
if(m){
	IsIE=true;
	IEVersion=+(m[1]||m[2]);
};

})();


if(IEVersion<11){
	Runtime.Log("兼容问题提醒：当前网页使用的IE"+IEVersion+'太过老旧，本脚本页面可能无法正常工作，请到微软官网<a href="https://support.microsoft.com/zh-cn/help/17621" target="_blank">升级IE11</a>以获得最佳兼容。',"#f90");
	
	//老浏览器，给予一些基础兼容支持
	if(!"".trim)String.prototype.trim=function(){return $.trim(this)};
	if(!Date.now)Date.now=function(){return new Date().getTime()};
	if(!Object.keys)Object.keys=function(o){var a=[];for(var k in o)if(o.hasOwnProperty(k))a.push(k);return a};
	
	if(!window.atob){//挂在window.下面IE8没有错误信息
		atob=function(v){return Base64.atob(v)};
		btoa=function(v){return Base64.btoa(v)};
	};
};

var Base64=function(){function c(a){this.message=a}var a={},b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return c.prototype=new Error,c.prototype.name="InvalidCharacterError",a.btoa||(a.btoa=function(a){var e,f,g,h,i,d=String(a);for(g=0,h=b,i="";d.charAt(0|g)||(h="=",g%1);i+=h.charAt(63&e>>8-8*(g%1))){if(f=d.charCodeAt(g+=.75),f>255)throw new c("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|f}return i}),a.atob||(a.atob=function(a){var f,g,e,h,i,d=String(a).replace(/[=]+$/,"");if(1==d.length%4)throw new c("'atob' failed: The string to be decoded is not correctly encoded.");for(e=0,h=0,i="";g=d.charAt(h++);~g&&(f=e%4?64*f+g:g,e++%4)?i+=String.fromCharCode(255&f>>(6&-2*e)):0)g=b.indexOf(g);return i}),a}();

</script>



<div style="width:0;height:0;overflow:hidden;">
	<img src="https://ia.51.la/go1?id=20807127&pvFlag=1">
</div>

</body>
</html>